﻿using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Api.Shared.Model
{
    public class Db95DeviceHis : INotifyPropertyChanged
    {
        public int Ret { get; set; }
        public float Kr16Time { get; set; }
        public float Kr500Time { get; set; }
        public float Dizuo1Time { get; set; }
        public float Dizuo2Time { get; set; }
        public float Dizuo3Time { get; set; }
        public float Kj1Time { get; set; }
        public float Kj2Time { get; set; }
        public float Kj3Time { get; set; }
        public float ZhouTime { get; set; }
        public float DamoTime { get; set; }

        public bool Kr16Trigger
        {
            get => kr16Trigger;
            set
            {
                if (kr16Trigger != value && value == true)
                {
                    NotifyPropertyChanged();
                }
                kr16Trigger = value;
            }
        }

        public bool Kr500Trigger
        {
            get => kr500Trigger;
            set
            {
                if (kr500Trigger != value && value == true)
                {
                    NotifyPropertyChanged();
                }
                kr500Trigger = value;
            }
        }


        private bool kr16Trigger;

        private bool kr500Trigger;

        public virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public event PropertyChangedEventHandler? PropertyChanged;
    }
}
